var app = getApp(),
    imgArray = [],
    uploaded = [];
Page({
    data: {
        hidden1: !1,
        hidden2: !0,
        hidden3: !0,
        index: 0,
        inde: 0,
        index_two: 0,
        prompt: !1,
        time: "00:00",
        time1: "00:00",
        choise: !1,
        images: [],
        upload_img: [],
        lunbo_len: 0,
        upload_img_length: 0,
        getmsg: "获取验证码",
        tel_code: !1,
        sms: !1,
        items: [{
            name: "刷卡支付",
            value: "刷卡支付"
        }, {
            name: "免费wifi",
            value: "免费wifi"
        }, {
            name: "免费停车",
            value: "免费停车"
        }, {
            name: "禁止吸烟",
            value: "禁止吸烟"
        }, {
            name: "提供包间",
            value: "提供包间"
        }, {
            name: "沙发休闲",
            value: "沙发休闲"
        }]
    },
    bindMultiPickerChange: function(e) {
        console.log("picker发送选择改变，携带值为", e.detail.value), this.setData({
            multiIndex: e.detail.value
        })
    },
    cost1: function(e) {
        var t = this;
        console.log(t.data), console.log(e);
        var o = t.data.stick,
            a = e.currentTarget.id;
        for (var n in o) o[n].hidden1 = n != a;
        t.setData({
            stick: o,
            type: o[a].type,
            inmoney: o[a].money
        })
    },
    onLoad: function(e) {
        var t = this;
        wx.setNavigationBarColor({
            frontColor: "#ffffff",
            backgroundColor: wx.getStorageSync("color"),
            animation: {
                duration: 0,
                timingFunc: "easeIn"
            }
        }), console.log(t.data);
        var o = wx.getStorageSync("url2"),
            a = wx.getStorageSync("openid"),
            n = wx.getStorageSync("users").id;
        console.log("用户的openid为 " + a + " 用户的user_id为 " + n), app.util.request({
            url: "entry/wxapp/GetUserInfo",
            cachetime: "0",
            data: {
                user_id: n
            },
            success: function(e) {
                console.log(e), 1 == e.data.state ? app.util.request({
                    url: "entry/wxapp/sjdlogin",
                    cachetime: "0",
                    data: {
                        user_id: n
                    },
                    success: function(e) {
                        console.log(e), 0 == e.data ? t.setData({
                            mystore: !0
                        }) : 2 == e.data.time_over ? wx.showModal({
                            title: "提示",
                            content: "你已经入驻过了哦",
                            showCancel: !0,
                            cancelText: "返回",
                            confirmText: "跳转首页",
                            success: function(e) {
                                wx.reLaunch({
                                    url: "../logs/logs",
                                    success: function(e) {},
                                    fail: function(e) {},
                                    complete: function(e) {}
                                })
                            },
                            fail: function(e) {},
                            complete: function(e) {}
                        }) : 1 == e.data.time_over && wx.showModal({
                            title: "提示",
                            content: "你的入驻已到期，是否继续入驻",
                            showCancel: !0,
                            cancelText: "取消",
                            cancelColor: "",
                            confirmText: "确定",
                            confirmColor: "",
                            success: function(e) {
                                e.confirm ? console.log("用户点击确定") : e.cancel && wx.reLaunch({
                                    url: "../logs/logs",
                                    success: function(e) {},
                                    fail: function(e) {},
                                    complete: function(e) {}
                                })
                            },
                            fail: function(e) {},
                            complete: function(e) {}
                        })
                    }
                }) : wx.showModal({
                    title: "提示",
                    content: "您的账号异常，请尽快联系管理员",
                    showCancel: !0,
                    cancelText: "取消",
                    confirmText: "确定",
                    success: function(e) {
                        wx.navigateBack({
                            delta: 1
                        })
                    },
                    fail: function(e) {},
                    complete: function(e) {}
                })
            }
        }), t.setData({
            user_id: n,
            openid: a,
            url: o
        }), app.util.request({
            url: "entry/wxapp/IsSms",
            cachetime: "0",
            success: function(e) {
                console.log(e), 1 == e.data ? t.setData({
                    send: !1,
                    sms: !0
                }) : t.setData({
                    send: !0,
                    sms: !1,
                    tel_code: !0
                })
            }
        }), app.util.request({
            url: "entry/wxapp/StoreType",
            cachetime: "0",
            success: function(e) {
                console.log(e), 0 == e.data.length && (wx.showModal({
                    title: "提示",
                    content: "平台暂未添加行业分类，无法入驻"
                }), setTimeout(function() {
                    wx.navigateBack({})
                }, 2e3));
                var o = e.data,
                    a = [];
                o.map(function(e) {
                    var t = {};
                    t = e.type_name, a.push(t)
                }), t.setData({
                    store: o,
                    store_type: a
                })
            }
        }), app.util.request({
            url: "entry/wxapp/InMoney",
            cachetime: "0",
            success: function(e) {
                console.log(e), 0 == e.data.length && (wx.showModal({
                    title: "提示",
                    content: "平台暂未添加入驻期限，无法入驻"
                }), setTimeout(function() {
                    wx.navigateBack({})
                }, 2e3));
                var o = e.data;
                for (var a in o) o[a].money > 0 ? o[a].money1 = "（收费" + o[a].money + "元）" : o[a].money1 = "  免费", 1 == o[a].type ? (o[a].array = "一周" + o[a].money1, o[a].hidden1 = !1) : 2 == o[a].type ? (o[a].array = "半年" + o[a].money1, o[a].hidden1 = !0) : 3 == o[a].type && (o[a].array = "一年" + o[a].money1, o[a].hidden1 = !0);
                t.setData({
                    stick: o,
                    type: o[0].type,
                    inmoney: o[0].money
                })
            }
        })
    },
    user_name: function(e) {
        var t = this;
        console.log(e);
        var o = e.detail.value;
        t.setData({
            name: o
        })
    },
    user_code: function(e) {
        var t = this;
        console.log(e);
        var o = e.detail.value;
        o != t.data.num ? wx.showToast({
            title: "验证码错误",
            icon: "",
            image: "",
            duration: 2e3,
            mask: !0,
            success: function(e) {},
            fail: function(e) {},
            complete: function(e) {}
        }) : t.setData({
            tel_code: !0,
            yz_code: o
        })
    },
    sendmessg: function(e) {
        var t = this;
        console.log(t.data);
        var o = t.data.name;
        if ("" == o || null == o) wx.showToast({
            title: "请输入手机号",
            icon: "",
            image: "",
            duration: 2e3,
            mask: !0,
            success: function(e) {},
            fail: function(e) {},
            complete: function(e) {}
        });
        else {
            for (var a = "", n = 0; n < 6; n++) a += Math.floor(10 * Math.random());
            console.log(a), app.util.request({
                url: "entry/wxapp/sms",
                cachetime: "0",
                data: {
                    code: a,
                    tel: o
                },
                success: function(e) {
                    console.log(e)
                }
            }), t.setData({
                num: a
            });
            var i = 60,
                s = setInterval(function() {
                    t.setData({
                        getmsg: i + "s后重新发送",
                        send: !0
                    }), --i <= 0 && (clearInterval(s), t.setData({
                        getmsg: "获取验证码",
                        send: !1,
                        num: 0
                    }))
                }, 1e3)
        }
    },
    bindTimeChange: function(e) {
        console.log("picker发送选择改变，携带值为", e.detail.value), this.setData({
            time: e.detail.value
        })
    },
    bindTimeChange1: function(e) {
        var t = this.data.time,
            o = e.detail.value;
        "00：00" == o ? wx.showModal({
            title: "提示",
            content: "营业结束时间不能为00:00",
            showCancel: !0,
            cancelText: "取消",
            confirmText: "确定",
            success: function(e) {},
            fail: function(e) {},
            complete: function(e) {}
        }) : o <= t ? wx.showModal({
            title: "提示",
            content: "营业结束时间不能为小于或等于营业开始时间",
            showCancel: !0,
            cancelText: "取消",
            confirmText: "确定",
            success: function(e) {},
            fail: function(e) {},
            complete: function(e) {}
        }) : this.setData({
            time1: e.detail.value
        })
    },
    add: function(e) {
        var t = this;
        wx.chooseLocation({
            type: "wgs84",
            success: function(e) {
                console.log(e);
                e.latitude, e.longitude, e.speed, e.accuracy;
                var o = e.latitude + "," + e.longitude;
                t.setData({
                    address: e.address,
                    coordinates: o
                })
            }
        })
    },
    bindPickerChanges: function(e) {
        this.data.store;
        var t = e.detail.value;
        this.setData({
            index: t,
            index_two: 0
        })
    },
    bindchange_two: function(e) {
        this.setData({
            index_two: e.detail.value
        })
    },
    bindRegionChange: function(e) {
        this.setData({
            inde: e.detail.value
        })
    },
    choice: function(e) {
        this.setData({
            choice: !0
        })
    },
    getPhoneNumber: function(e) {
        var t = this,
            o = wx.getStorageSync("key"),
            a = e.detail.iv,
            n = e.detail.encryptedData;
        console.log(o), console.log(a), console.log(n), app.util.request({
            url: "entry/wxapp/jiemi",
            cachetime: "0",
            data: {
                sessionKey: o,
                iv: a,
                data: n
            },
            success: function(e) {
                console.log(e), t.setData({
                    num: e.data.phoneNumber
                })
            }
        })
    },
    previewImage: function(e) {
        var t = e.currentTarget.dataset.index,
            o = this.data.lunbo;
        wx.previewImage({
            current: o[t],
            urls: o
        })
    },
    previewImage1: function(e) {
        var t = e.currentTarget.dataset.index,
            o = this.data.lunbo1;
        wx.previewImage({
            current: o[t],
            urls: o
        })
    },
    lunbo1: function(e) {
        var t = this;
        wx.getStorageSync("uniacid");
        console.log(t.data);
        var o = t.data.lunbo;
        o = null == o ? [] : t.data.lunbo;
        t.data.url;
        wx.chooseImage({
            count: 9,
            sizeType: ["original", "compressed"],
            sourceType: ["album", "camera"],
            success: function(e) {
                console.log(e), Array.prototype.push.apply(o, e.tempFilePaths), o.length <= 9 ? t.setData({
                    lunbo1: o,
                    lunbo_len1: o.length,
                    log: !0
                }) : (o = o.slice(0, 9), t.setData({
                    lunbo1: o,
                    lunbo_len1: o.length,
                    log: !0
                }))
            }
        })
    },
    choose: function(e) {
        var t = this,
            o = t.data.url,
            a = wx.getStorageSync("uniacid");
        console.log(o), console.log(a), wx.chooseImage({
            count: 1,
            sizeType: ["original", "compressed"],
            sourceType: ["album", "camera"],
            success: function(e) {
                console.log(e);
                var n = e.tempFilePaths[0];
                wx.uploadFile({
                    url: o + "app/index.php?i=" + a + "&c=entry&a=wxapp&do=Upload&m=zh_tcwq",
                    filePath: n,
                    name: "upfile",
                    formData: {},
                    success: function(e) {
                        console.log(e), t.setData({
                            hotel_logo: e.data
                        })
                    },
                    fail: function(e) {
                        console.log(e)
                    }
                }), t.setData({
                    hotel_logo1: n
                })
            }
        })
    },
    choose1: function(e) {
        var t = this,
            o = t.data.url,
            a = wx.getStorageSync("uniacid");
        wx.getStorageSync("openid");
        wx.chooseImage({
            count: 1,
            sizeType: ["original", "compressed"],
            sourceType: ["album", "camera"],
            success: function(e) {
                console.log(e);
                var n = e.tempFilePaths[0];
                wx.uploadFile({
                    url: o + "app/index.php?i=" + a + "&c=entry&a=wxapp&do=Upload&m=zh_tcwq",
                    filePath: n,
                    name: "upfile",
                    formData: {},
                    success: function(e) {
                        console.log(e), t.setData({
                            wechat: e.data
                        })
                    },
                    fail: function(e) {
                        console.log(e)
                    }
                }), t.setData({
                    hotel_logo2: n
                })
            }
        })
    },
    choose2: function(e) {
        var t = this,
            o = t.data.url,
            a = wx.getStorageSync("uniacid");
        wx.getStorageSync("openid");
        wx.chooseImage({
            count: 1,
            sizeType: ["original", "compressed"],
            sourceType: ["album", "camera"],
            success: function(e) {
                console.log(e);
                var n = e.tempFilePaths[0];
                wx.uploadFile({
                    url: o + "app/index.php?i=" + a + "&c=entry&a=wxapp&do=Upload&m=zh_tcwq",
                    filePath: n,
                    name: "upfile",
                    formData: {},
                    success: function(e) {
                        console.log(e), t.setData({
                            yyzz: e.data
                        })
                    },
                    fail: function(e) {
                        console.log(e)
                    }
                }), t.setData({
                    hotel_logo3: n
                })
            }
        })
    },
    choose3: function(e) {
        var t = this,
            o = t.data.url,
            a = wx.getStorageSync("uniacid");
        wx.getStorageSync("openid");
        wx.chooseImage({
            count: 1,
            sizeType: ["original", "compressed"],
            sourceType: ["album", "camera"],
            success: function(e) {
                console.log(e);
                var n = e.tempFilePaths[0];
                wx.uploadFile({
                    url: o + "app/index.php?i=" + a + "&c=entry&a=wxapp&do=Upload&m=zh_tcwq",
                    filePath: n,
                    name: "upfile",
                    formData: {},
                    success: function(e) {
                        console.log(e), t.setData({
                            sfzzm: e.data
                        })
                    },
                    fail: function(e) {
                        console.log(e)
                    }
                }), t.setData({
                    hotel_logo4: n
                })
            }
        })
    },
    checkboxChange: function(e) {
        var t = this;
        console.log(e);
        var o = e.detail.value;
        t.setData({
            facilities: o
        })
    },
    chooseImage2: function() {
        var e = this,
            t = this.data.images;
        imgArray = [], console.log(e.data);
        var o = wx.getStorageSync("uniacid"),
            a = 9 - t.length;
        a > 0 && a <= 9 ? wx.chooseImage({
            count: a,
            sizeType: ["compressed"],
            sourceType: ["album", "camera"],
            success: function(a) {
                wx.showToast({
                    icon: "loading",
                    title: "正在上传"
                });
                var n = a.tempFilePaths;
                console.log(n);
                var i = a.tempFilePaths;
                t = t.concat(i), console.log(t), e.setData({
                    images: t,
                    lunbo_len: t.length
                }), e.uploadimg({
                    url: e.data.url + "app/index.php?i=" + o + "&c=entry&a=wxapp&do=Upload&m=zh_tcwq",
                    path: t
                })
            }
        }) : wx.showModal({
            title: "上传提示",
            content: "最多上传9张图片",
            showCancel: !0,
            cancelText: "取消",
            confirmText: "确定",
            success: function(e) {},
            fail: function(e) {},
            complete: function(e) {}
        })
    },
    uploadimg: function(e) {
        var t = this,
            o = e.i ? e.i : 0,
            a = e.success ? e.success : 0,
            n = e.fail ? e.fail : 0;
        wx.uploadFile({
            url: e.url,
            filePath: e.path[o],
            name: "upfile",
            formData: null,
            success: function(e) {
                "" != e.data ? (console.log(e), a++, imgArray.push(e.data), console.log(o), console.log("上传商家轮播图时候提交的图片数组", imgArray)) : wx.showToast({
                    icon: "loading",
                    title: "请重试"
                })
            },
            fail: function(e) {
                n++, console.log("fail:" + o + "fail:" + n)
            },
            complete: function() {
                console.log(o), ++o == e.path.length ? (t.setData({
                    images: e.path
                }), wx.hideToast(), console.log("执行完毕"), console.log("成功：" + a + " 失败：" + n)) : (console.log(o), e.i = o, e.success = a, e.fail = n, t.uploadimg(e))
            }
        })
    },
    delete: function(e) {
        var t = this;
        console.log(t.data), console.log(imgArray), Array.prototype.indexOf = function(e) {
            for (var t = 0; t < this.length; t++) if (this[t] == e) return t;
            return -1
        }, Array.prototype.remove = function(e) {
            var t = this.indexOf(e);
            t > -1 && this.splice(t, 1)
        };
        var o = e.currentTarget.dataset.index,
            a = this.data.images;
        imgArray.remove(imgArray[o]), a.remove(a[o]), console.log(a), t.setData({
            images: a,
            lunbo_len: a.length
        })
    },
    upload_image: function() {
        var e = this,
            t = this.data.upload_img;
        uploaded = [], console.log(t);
        var o = wx.getStorageSync("uniacid"),
            a = 9 - t.length;
        a > 0 && a <= 9 ? wx.chooseImage({
            count: a,
            sizeType: ["compressed"],
            sourceType: ["album", "camera"],
            success: function(a) {
                wx.showToast({
                    icon: "loading",
                    title: "正在上传"
                });
                var n = a.tempFilePaths;
                t = t.concat(n), console.log(t), e.setData({
                    upload_img: t,
                    upload_img_length: t.length
                }), e.already({
                    url1: e.data.url + "app/index.php?i=" + o + "&c=entry&a=wxapp&do=Upload&m=zh_tcwq",
                    path1: t
                })
            }
        }) : wx.showModal({
            title: "上传提示",
            content: "最多上传9张图片",
            showCancel: !0,
            cancelText: "取消",
            confirmText: "确定",
            success: function(e) {},
            fail: function(e) {},
            complete: function(e) {}
        })
    },
    already: function(e) {
        var t = this,
            o = e.j ? e.j : 0,
            a = e.success ? e.success : 0,
            n = e.fail ? e.fail : 0;
        wx.uploadFile({
            url: e.url1,
            filePath: e.path1[o],
            name: "upfile",
            formData: null,
            success: function(e) {
                "" != e.data ? (console.log(e), a++, uploaded.push(e.data), t.setData({
                    uploaded: uploaded
                }), console.log(o), console.log("上传商家介绍时候提交的图片数组", uploaded)) : wx.showToast({
                    icon: "loading",
                    title: "请重试"
                })
            },
            fail: function(e) {
                n++, console.log("fail:" + o + "fail:" + n)
            },
            complete: function() {
                console.log(o), ++o == e.path1.length ? (t.setData({
                    upload_img: e.path1
                }), wx.hideToast(), console.log("执行完毕"), console.log("成功：" + a + " 失败：" + n)) : (console.log(o), e.j = o, e.success = a, e.fail = n, t.already(e))
            }
        })
    },
    delete2: function(e) {
        var t = this;
        Array.prototype.indexOf = function(e) {
            for (var t = 0; t < this.length; t++) if (this[t] == e) return t;
            return -1
        }, Array.prototype.remove = function(e) {
            var t = this.indexOf(e);
            t > -1 && this.splice(t, 1)
        };
        var o = e.currentTarget.dataset.index,
            a = this.data.upload_img;
        uploaded.remove(uploaded[o]), a.remove(a[o]), console.log(a), t.setData({
            upload_img: a,
            upload_img_length: a.length
        })
    },
    formSubmit: function(e) {
        var t = this;
        console.log(e), console.log(t.data);
        var o = e.detail.formId,
            a = Number(t.data.inmoney),
            n = t.data.type;
        console.log(a + " " + n);
        wx.getStorageSync("uniacid");
        var i = wx.getStorageSync("openid"),
            s = t.data.facilities,
            l = t.data.hotel_logo,
            c = t.data.wechat,
            u = t.data.yyzz,
            r = t.data.sfzzm,
            d = e.detail.value.business_name,
            g = e.detail.value.business_keyword,
            p = t.data.address,
            m = t.data.time,
            f = t.data.time1,
            h = e.detail.value.business_number,
            y = e.detail.value.business_notice,
            w = e.detail.value.vr_demo,
            x = e.detail.value.textarea,
            v = t.data.coordinates,
            _ = t.data.store,
            T = t.data.index,
            S = _[T],
            D = _[T].id,
            b = t.data.tel_code;
        console.log(S);
        var z = a;
        t.data.index_two;
        if (console.log(imgArray), console.log(uploaded), 0 == imgArray.length) k = "";
        else var k = imgArray.join(",");
        if (0 == uploaded.length) P = "";
        else var P = uploaded.join(",");
        var q = "";
        if ("" != x && null != x || (x = ""), "" == d ? q = "请输入商家名称" : "" == g ? q = "请输入关键字" : "" == p ? q = "请输入详细地址" : null == s ? q = "请勾选店内设施" : 0 == s.length ? q = "请勾选店内设施" : "00:00" == m ? q = "请输入营业开始时间" : "00:00" == f ? q = "请输入营业结束时间" : "" == h ? q = "请输入联系电话" : "" == y ? q = "请输入公告说明" : x.length >= 540 ? q = "内容超出" : 0 == t.data.sms ? null == t.data.num && (q = "请进行手机号验证") : 1 == t.data.sms && null == t.data.yz_code && (q = "请进行手机号验证"), "" != q) wx.showModal({
            title: "提示",
            content: q,
            showCancel: !0,
            cancelText: "取消",
            confirmText: "确定",
            success: function(e) {},
            fail: function(e) {},
            complete: function(e) {}
        });
        else {
            for (var I = 0, C = 0, A = 0, M = 0, F = 0, j = 0, L = 0; L < s.length; L++) if ("刷卡支付" == s[L]) I = 1;
            else if ("免费wifi" == s[L]) C = 1;
            else if ("免费停车" == s[L]) A = 1;
            else if ("禁止吸烟" == s[L]) M = 1;
            else if ("提供包间" == s[L]) F = 1;
            else if ("沙发休闲" == s[L]) j = 1;
            if (1 == b) {
                var U = wx.getStorageSync("city");
                z <= 0 ? app.util.request({
                    url: "entry/wxapp/store",
                    cachetime: "0",
                    data: {
                        user_id: t.data.user_id,
                        store_name: d,
                        address: p,
                        announcement: y,
                        storetype_id: D,
                        area_id: "",
                        start_time: m,
                        end_time: f,
                        keyword: g,
                        skzf: I,
                        wifi: C,
                        mftc: A,
                        jzxy: M,
                        tgbj: F,
                        sfxx: j,
                        tel: h,
                        logo: l,
                        weixin_logo: c,
                        yyzz_img: u,
                        sfz_img: r,
                        ad: k,
                        img: P,
                        money: z,
                        details: x,
                        coordinates: v,
                        type: n,
                        vr_link: w,
                        cityname: U
                    },
                    success: function(e) {
                        console.log("这里是发布成功"), console.log(e);
                        var t = e.data;
                        console.log(t), app.util.request({
                            url: "entry/wxapp/rzmessage",
                            cachetime: "0",
                            data: {
                                form_id: o,
                                openid: i,
                                store_id: t
                            },
                            success: function(e) {
                                console.log(e)
                            }
                        }), app.util.request({
                            url: "entry/wxapp/SaveStorePayLog",
                            cachetime: "0",
                            data: {
                                store_id: t,
                                money: z
                            },
                            success: function(e) {
                                console.log("这是入驻成功"), console.log(e)
                            }
                        }), wx.showModal({
                            title: "提示",
                            content: "提交成功，等待审核"
                        }), setTimeout(function() {
                            wx.reLaunch({
                                url: "../logs/logs",
                                success: function(e) {},
                                fail: function(e) {},
                                complete: function(e) {}
                            })
                        }, 2e3)
                    }
                }) : app.util.request({
                    url: "entry/wxapp/Pay",
                    cachetime: "0",
                    data: {
                        openid: i,
                        money: z
                    },
                    success: function(e) {
                        wx.requestPayment({
                            timeStamp: e.data.timeStamp,
                            nonceStr: e.data.nonceStr,
                            package: e.data.package,
                            signType: e.data.signType,
                            paySign: e.data.paySign,
                            success: function(e) {
                                console.log("这里是支付成功"), console.log(e), app.util.request({
                                    url: "entry/wxapp/store",
                                    cachetime: "0",
                                    data: {
                                        user_id: t.data.user_id,
                                        store_name: d,
                                        address: p,
                                        announcement: y,
                                        storetype_id: D,
                                        area_id: "",
                                        start_time: m,
                                        end_time: f,
                                        keyword: g,
                                        skzf: I,
                                        wifi: C,
                                        mftc: A,
                                        jzxy: M,
                                        tgbj: F,
                                        sfxx: j,
                                        tel: h,
                                        logo: l,
                                        weixin_logo: c,
                                        yyzz_img: u,
                                        sfz_img: r,
                                        ad: k,
                                        money: z,
                                        img: P,
                                        details: x,
                                        coordinates: v,
                                        type: n,
                                        vr_link: w,
                                        cityname: U
                                    },
                                    success: function(e) {
                                        console.log("这里是发布成功"), console.log(e);
                                        var t = e.data;
                                        app.util.request({
                                            url: "entry/wxapp/rzmessage",
                                            cachetime: "0",
                                            data: {
                                                form_id: o,
                                                openid: i,
                                                store_id: t
                                            },
                                            success: function(e) {
                                                console.log(e)
                                            }
                                        }), app.util.request({
                                            url: "entry/wxapp/SaveStorePayLog",
                                            cachetime: "0",
                                            data: {
                                                store_id: t,
                                                money: z
                                            },
                                            success: function(e) {
                                                console.log("这是入驻成功"), console.log(e), wx.showModal({
                                                    title: "提示",
                                                    content: "提交成功，等待审核"
                                                })
                                            }
                                        }), setTimeout(function() {
                                            wx.reLaunch({
                                                url: "../logs/logs",
                                                success: function(e) {},
                                                fail: function(e) {},
                                                complete: function(e) {}
                                            })
                                        }, 2e3)
                                    }
                                })
                            },
                            fail: function(e) {
                                console.log(e), wx.showToast({
                                    title: "支付失败",
                                    duration: 1e3
                                })
                            }
                        })
                    }
                })
            } else wx.showToast({
                title: "验证码错误",
                icon: "",
                image: "",
                duration: 2e3,
                mask: !0,
                success: function(e) {},
                fail: function(e) {},
                complete: function(e) {}
            })
        }
    },
    reset: function(e) {},
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});